import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Inde from '../views/IndexView.vue'
import Video from "../views/VideoView.vue";
import Player from "../views/PlayerView.vue";
import Comments from "../views/CommentsView.vue";
import Results from "../views/ResultsView.vue";
const routes = [
  {
    path: '/',
    redirect:'/index'
  },
  {
    path: '/index',
    name: 'Index',
    component:Inde
  },
  {
    path: '/results/:musicName?',
    name: 'ResultsView',
    component: Results,
  },
  {
    path: '/player/:id',
    name: 'Player',
    component: Player
  },
  {
    path: '/comments/:id?',
    name: 'Comments',
    component: Comments
  },
  {
    path: '/video/:id?',
    name: 'Video',
    component: Video
  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
